package com.app.main;




import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class Main extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        
        View newButton = this.findViewById(R.id.best_seller);
        newButton.setOnClickListener(this);
        
        View searchButton = this.findViewById(R.id.search_button);
        searchButton.setOnClickListener(this);
        
        View aboutButton = this.findViewById(R.id.about_button);
        aboutButton.setOnClickListener(this);
        
    }
    
    //public void on
    
    public void onClick(View v){
    	Intent intent = null;
    	
    	switch(v.getId()){
	    	case R.id.about_button  :
	    		  intent = new Intent(Main.this, About.class);
	    	      startActivity(intent);
	    	      overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
	    	break;
    	
	    	case R.id.best_seller  :
	    		  intent = new Intent(Main.this, BestSellerCategory.class);
	    	      startActivity(intent);
	    	      overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
	    	break;
	    	
	    	case R.id.search_button  :
	    		  intent = new Intent(Main.this, SearchMain.class);
	    	      startActivity(intent);
	    	      overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
	    	break;
    	
    	}
    }
}